package com.example.testdemo.spring.factory;

import com.example.testdemo.expection.BeansException;
import com.example.testdemo.spring.bean.BeanDefinition;

import java.util.Set;

/**
 * <p>
 *
 * </p>
 *
 * @author 永健
 * @since 2020-03-29 00:39
 */
public interface SingletonBeanFactory {
    void registerSingleton(String beanName, BeanDefinition beanDefinition) throws BeansException;

    void registerSingleton(String beanName, Object obj) throws BeansException;

    <T> T getBean(String beanName) throws BeansException;

    Object getBean(Class<?> aClass) throws BeansException;

    int getBeanDefinitionCount();

    Set<String> getBeanDefinitionNames();
}
